- mirror = f.object
- verified_by = mirror.ssh_known_hosts_verified_by
- verified_at = mirror.ssh_known_hosts_verified_at

.form-group.js-ssh-host-keys-section{ class: ('collapse' unless mirror.ssh_mirror_url?) }
  = render Pajamas::ButtonComponent.new(button_options: { class: 'js-detect-host-keys gl-mr-3', data: { testid: 'detect-host-keys' } }) do
    = gl_loading_icon(inline: true, css_class: 'js-spinner gl-hidden gl-mr-2')
    = _('Detect host keys')
  .fingerprint-ssh-info.js-fingerprint-ssh-info.gl-mt-3.gl-mb-3{ class: ('collapse' unless mirror.ssh_mirror_url?) }
    %label.label-bold
      = _('Fingerprints')
    .fingerprints-list.js-fingerprints-list{ data: { testid: 'fingerprints-list' } }
      - mirror.ssh_known_hosts_fingerprints.each do |fp|
        %code= fp.fingerprint_sha256 || fp.fingerprint
    - if verified_at
      .form-text.gl-text-subtle.js-fingerprint-verification
        = sprite_icon('check', css_class: 'gl-fill-icon-success')
        Verified by
        - if verified_by
          = link_to verified_by.name, user_path(verified_by)
        - else
          = _('a deleted user')
        #{time_ago_in_words(verified_at)} ago

  .js-ssh-hosts-advanced.gl-inline-block
    = render Pajamas::ButtonComponent.new(button_options: { class: 'btn-show-advanced show-advanced' }) do
      %span.label-show
        = _('Input host keys manually')
      %span.label-hide
        = _('Hide host keys manual input')
  .js-ssh-known-hosts.collapse.gl-mt-3
    = f.label :ssh_known_hosts, _('SSH host keys'), class: 'label-bold'
    = f.text_area :ssh_known_hosts, class: 'form-control known-hosts js-known-hosts', rows: '10'
